/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package argtrust.argsys;


import argtrust.logic.InferenceNode;

/**
 *
 * @author Yuqing Tang
 */
public class Argument  {
    protected InferenceNode mEndInferenceNode;

    public Argument(InferenceNode inf)
    {
        mEndInferenceNode = inf;
    }

    public InferenceNode getEndInferenceNode()
    {
        return mEndInferenceNode;
    }

    public void debug_print(java.io.PrintStream out)
    {
        mEndInferenceNode.debug_print(out);
    }
    @Override
    public int hashCode() {
        if (mEndInferenceNode != null) {
            return mEndInferenceNode.hashCode();
        } else {
            return 17;
        }
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }


        final Argument rhs = (Argument) obj;
        boolean res = true;
        if (mEndInferenceNode != null) {
            res = res && mEndInferenceNode.equals(rhs.mEndInferenceNode);
        } else {
            res = res && rhs.mEndInferenceNode == null;
        }

        return res;

    }

}
